include ../share.mk

INCLUDES=-I./ -I../include -I$(GTEST_INCLUDE) -I$(LOG4CXX_INCLUDE)

LIBS= -L../src -lrecengine -L$(GTEST_LIB) -L$(LOG4CXX_LIB)

SRC=$(wildcard *test.cpp)
OBJECTS=$(patsubst %.cpp, %.o, $(SRC))
TARGET=$(patsubst %test.cpp, %_ut, $(SRC))

all: $(TARGET)

%.o: %.cpp
	$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@

$(TARGET): %_ut: %test.o ../src/librecengine.a 
	$(CXX) -o $@ $< -L./ $(LIBS)


clean:
	rm -f $(TARGET) *.o

